package line;

import graphEd.EditorMenuBar;
import graphEd.GraphEditor;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;

import com.mxgraph.util.mxResources;

/**
 * Classe qui s'occupe de modifier une ligne.
 * @author p064710
 *
 */
public class ModifyLine extends DialogLineChooser{
	private static final long serialVersionUID = 1L;
	
	public ModifyLine(){
		setTitle(mxResources.get("modifyLine"));
		setValidateButton(mxResources.get("modify"));
		setValidateListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent evt) {				
				GraphEditor editor = new GraphEditor();
				JFrame frameEditor = editor.createFrame(new EditorMenuBar(editor));
				frameEditor.setVisible(true);
				editor.open(editor, getCurrentInfoLigne());
				ModifyLine.this.dispose();
			}
		});
	}
	
	public static void main(String[] args) throws Exception{
		new ModifyLine();
	}
	
}
